//
//  User.m
//  Aun
//
//  Created by Alexander on 8/25/10.
//  Copyright 2010 KTH Royal Institute of Technology. All rights reserved.
//

#import "User.h"


@implementation User

@synthesize username;
@synthesize passhash;
@synthesize name;
@synthesize identifier;

- (id)initWithIdentifier:(NSString *)anIdentifier 
					name:(NSString *)aName
				username:(NSString *)aUsername
				passhash:(NSString *)aPasshash {
    self = [super init];
    if (self) {
		[identifier = anIdentifier retain]; // does assignment and retain in one line work?
		[name = aName retain];
        [username = aUsername retain];
		[passhash = aPasshash retain];
    }
    return self;
}

- (void)dealloc {
    [username release];
	[passhash release];
	[name release];
    [identifier release];
    [super dealloc];
}

@end
